import java.lang.reflect.Method;
import java.util.stream.Stream;

/**
 * @author zhu
 * @date 2024-04-16
 */
public class MainTest02 {
    public static void main(String[] args) {
        Stream.of(UserService.class.getDeclaredMethods())
                .filter(m -> m.isAnnotationPresent(Order.class))
                .sorted((m1, m2) -> m1.getAnnotation(Order.class).value() - m2.getAnnotation(Order.class).value())
                .map(Method::getName)
                .forEach(System.out::println);
    }
}